#include "rpc_controllerimpl.h"

RPCControllerImpl::RPCControllerImpl()
    : m_cancel_flag( false ),
      m_failed_flag( false )
{}

RPCControllerImpl::~RPCControllerImpl() throw()
{}

void RPCControllerImpl::Reset()
{
    m_cancel_flag = false;
    m_failed_flag = false;
}

bool RPCControllerImpl::Failed() const
{
    return m_failed_flag;
}

std::string RPCControllerImpl::ErrorText() const
{
    return m_failed_reason;
}

void RPCControllerImpl::StartCancel()
{
    return;
}

void RPCControllerImpl::SetFailed( const std::string & reason )
{
    m_failed_flag   = true;
    m_failed_reason = reason;
}

bool RPCControllerImpl::IsCanceled() const
{
    return m_cancel_flag;
}

void RPCControllerImpl::NotifyOnCancel( google::protobuf::Closure * callback )
{
    UNUSE_ARG( callback );
    return;
}


